package com.example.train.infra.repository.impl;

import com.example.train.domain.entity.Employee;
import com.example.train.domain.repository.IndexRepository;
import com.example.train.infra.mapper.IndexMapper;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class IndexRepositoryImpl implements IndexRepository {

    private final IndexMapper indexMapper;

    public IndexRepositoryImpl(IndexMapper indexMapper) {
        this.indexMapper = indexMapper;
    }

    @Override
    public List<Employee> findEmployeeByCondition(Employee employee) {
        return indexMapper.findEmployeeByCondition(employee);
    }
}
